package main

import (
	"fmt"
	"os"
)

type ConsoleLog struct {

}

func NewConsoleLog() (*ConsoleLog, error){
	return  &ConsoleLog{}, nil
}

func (this *ConsoleLog)init(){

}

func (this *ConsoleLog) Info(format string, args ...interface{}) {
	logData :=MsgInfo(INFO, format, args)
	fmt.Fprintf(os.Stdout, "%s %s [%s/%s:%d] %s\n", logData.TimeStr, logData.LevelStr, logData.FileName, logData.FuncName, logData.LineNo, logData.Message)
}
func (this *ConsoleLog) Debug(format string, args ...interface{}) {
	logData :=MsgInfo(DEBUG, format, args)
	fmt.Fprintf(os.Stdout, "%s %s [%s/%s:%d] %s\n", logData.TimeStr, logData.LevelStr, logData.FileName, logData.FuncName, logData.LineNo, logData.Message)
}
func (this *ConsoleLog) Error(format string, args ...interface{}){
	logData :=MsgInfo(ERROR, format, args)
	fmt.Fprintf(os.Stdout, "%s %s [%s/%s:%d] %s\n", logData.TimeStr, logData.LevelStr, logData.FileName, logData.FuncName, logData.LineNo, logData.Message)

}
func (this *ConsoleLog) Warn(format string, args ...interface{}){
	logData :=MsgInfo(WARN, format, args)
	fmt.Fprintf(os.Stdout, "%s %s [%s/%s:%d] %s\n", logData.TimeStr, logData.LevelStr, logData.FileName, logData.FuncName, logData.LineNo, logData.Message)

}
func (this *ConsoleLog) Close(){
}